//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { LinkTag, LinkTagResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooLinkTagList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<LinkTagResponse>(`/uctoo/link_tag/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooLinkTag = async (id: string) => {
  return requestClient.get<LinkTag>(`/uctoo/link_tag/${id}`);
};

export const adductooLinkTag = async (data: Partial<LinkTag>) => {
  return requestClient.post<LinkTag>('/uctoo/link_tag/add', data);
};

export const edituctooLinkTag = async (data: Partial<LinkTag>) => {
  return requestClient.post<LinkTag>('/uctoo/link_tag/edit', data);
};

export const deleteuctooLinkTag = async (id: string) => {
  return requestClient.post<any>('/uctoo/link_tag/del', { id });
};
